﻿@model Fcom.VNInsurance.Web.Models.ProductLang
@{
    ViewBag.Title = Model.DisplayName;
    var LangCat = (Fcom.VNInsurance.Web.Models.ProductCatLang)ViewBag.LangCat;
    Layout = "~/Views/Shared/_0311layout.cshtml";
    var productFAQ = (IEnumerable<Fcom.VNInsurance.Web.Models.ProductFAQ>)ViewBag.productFAQ;
    var Userinfo = (Fcom.IDLib.SaveMoneyID.FullUserInfo)ViewBag.FullUserinfo;
}
<div class="container">
     <ul class="breadcrumb" style="margin-bottom:0px !important">
                      <li><a href="@Url.Action("Index", "Home")">@Fcom.VNInsurance.Web.LangResource.Layout.lblHome</a></li>
                <li><a href="@Url.Action("Index",LangCat.ProductCat.CatName)">@LangCat.DisplayName</a></li>
                      <li class="active">@Model.DisplayName</li>
      </ul>
            <div style="clear:both"></div>
    <div class="top_slider container" id="afocus">
             <div class="col-lg-7" style="padding-top:10px;font-weight:bold;">
             @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblComapreMaket
             </div>
			<div class="col-lg-4">
                        <ol class="top_bar">
                        <li><a class="active" id="show_div"><span style="font-weight:bold;">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblinfomation</span></a> </li>
                        <li><a class="bar_2"><span>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblcomparison</span></a></li>
                        <li><a class="bar_3"><span>@Fcom.VNInsurance.Web.LangResource.Layout.lblPolicy</span></a></li>
                        <li style="width: 70px !important;"><a class="bar_4"><span>@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblfinish</span></a></li>
                    </ol>
            <div style="clear:both"></div>
			</div>
           <div style="clear:both"></div>
        </div>
</div>
<div class="container" style="margin-top:10px;">
    <div class="accleft">
              
    <div class="accordion" id="accordion2">
            @foreach (var fq in productFAQ)
            { 
                                    <h3><img src="@Url.Content("~/Content/images/arrow_accord.gif")" alt="vnbaohiem"/> @fq.Question</h3>
                <div>

                    @Html.Raw(HttpUtility.HtmlDecode(fq.Answer))
                </div>
                                                       
                       
           
            }
    </div>
        
    </div>
    <div class="accright">   
        <strong>
            @Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblInsuranceinfo </strong><br />
            <form method="post" id="frmcollect">
            <ul>
               @if (!User.Identity.IsAuthenticated)
               {
                   
                <li>
                    @Html.Hidden("isAuth",false)
                    <label for="haveAccount">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblAreyoumember</label>
                    <label class="nonleft" style="font-weight:normal">
                <input type="radio" name="haveAccount" id="optionsRadios1" value="true" />
                @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblHave
              </label>
                  <label class="nonleft" style="font-weight:normal">
                <input type="radio" name="haveAccount" id="optionsRadios2" value="false" checked/>
                @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblHavent
              </label>
                    <div style="clear:both"></div>
                </li>
                      <li class="userli">
                                       <label for="haveAccount">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblyoure</label>
                                 <label class="nonleft2" style="font-weight:normal">
                            <input type="radio" name="accountype" id="accountpesional" value="1" checked/> @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblpersional
               
                          </label>
                               <label class="nonleft2" style="font-weight:normal">
                            @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblcorp
                                  </label>
                           <div style="clear:both"></div>
                       
                     </li>
                     <li class="userli">
                         <label id="lbfullname" for="yourfullname">@Fcom.VNInsurance.Web.LangResource.Layout.lblFullname</label>
                         <input type="text" class="form-control" style="width:170px" name="yourfullname" id="yourfullname" placeholder="@Fcom.VNInsurance.Web.LangResource.Layout.lblEnterFullname"/>
                     </li>
                      <li class="userli ">
                         <label for="youremail">@Fcom.VNInsurance.Web.LangResource.Layout.lblEmail</label>
                         <input type="text" style="width:170px" class="form-control" name="youremail" id="youremail" placeholder="@Fcom.VNInsurance.Web.LangResource.Layout.lblEnterYourEmail"/>
                        
                     </li>
                      <li class="userli ">
                         <label for="yourphone">@Fcom.VNInsurance.Web.LangResource.Layout.lblYourPhone</label>
                         <input type="text" style="width:170px" class="form-control" name="yourphone" id="yourphone" placeholder="@Fcom.VNInsurance.Web.LangResource.Layout.lblEnterYourPhone"/>
                     </li>
                       <li class="userli  userpersonal">
                    <label for="Model">@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblGender</label>
                    <label style="font-weight:normal" class="nonleft"><input type="radio" name="gender" value="true" checked="">@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblBoy</label> <label class="nonleft" style="font-weight:normal"><input type="radio" name="gender" value="true">@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblGirl</label>
                           <div style="clear:both"></div>
                </li>
                      <li class="userli userpersonal">
                    <label for="Model">@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblBirthday</label>
                    <input type="text" name="dateofBirth" class="form-control" id="dateofBirth" placeholder="dd/mm/yyyy"/>
                           <div style="clear:both"></div>
                </li>
               }
               else
               {
                     @Html.Hidden("isAuth",true)
                 
                     <li class="userli">
                         <label id="lbfullname" for="yourfullname">@Fcom.VNInsurance.Web.LangResource.Layout.lblFullname</label>
                         <input type="text" readonly class="form-control" style="width:170px" name="yourfullname" id="yourfullname" placeholder="@Fcom.VNInsurance.Web.LangResource.Layout.lblEnterFullname" value="@Userinfo.Fullname"/>
                     </li>
                      <li class="userli ">
                         <label for="youremail">@Fcom.VNInsurance.Web.LangResource.Layout.lblEmail</label>
                         <input type="text" readonly style="width:170px" class="form-control" name="youremail" id="youremail" placeholder="@Fcom.VNInsurance.Web.LangResource.Layout.lblEnterYourEmail" value="@Userinfo.Email"/>
                        
                     </li>
                      <li class="userli ">
                         <label for="yourphone">@Fcom.VNInsurance.Web.LangResource.Layout.lblYourPhone</label>
                         <input type="text" readonly style="width:170px" class="form-control" name="yourphone" id="yourphone" placeholder="@Fcom.VNInsurance.Web.LangResource.Layout.lblEnterYourPhone" value="@Userinfo.Phone"/>
                     </li>
                      if(Userinfo.GroupID==1)
                      {
                       <li class="userli  userpersonal">
                    <label for="Model">@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblGender</label>
                    <label style="font-weight:normal" class="nonleft"><input readonly type="radio" name="gender" value="true" @(Userinfo.Gender ==true ? "checked": "")>@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblBoy</label> <label class="nonleft" style="font-weight:normal"><input type="radio" name="gender" value="" @(Userinfo.Gender==false ? "checked": "") readonly>@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblGirl</label>
                           <div style="clear:both"></div>
                </li>
                      <li class="userli userpersonal">
                    <label for="Model">@Fcom.VNInsurance.Web.LangResource.LifeInsurance.lblBirthday</label>
                    <input type="text" name="dateofBirth" class="form-control" id="dateofBirth" readonly value="@(Userinfo.DateOfBirth.ToString())" placeholder="dd/mm/yyyy"/>
                           <div style="clear:both"></div>
                </li>
                      }
               }
            </ul>
                <div class="agreedv">
                <input type="checkbox" name="AgreeTerm" checked /> @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblAgree <a href="@Url.Action("Term", "Home")" target="_blank">@Fcom.VNInsurance.Web.LangResource.ContactLayout.lblOurTermagree</a>
                 <input type="submit" id="btnsubmitf" class="btnbaophi@(Request.Cookies["_culture"]["lang"])" style="" value="Báo phí"/>
                    </div>
            </form>
            
    </div>
    <div style="clear:both"></div>
</div>
<div id="summary"></div>
<div style="padding-left:30px;padding-right:30px;padding-top:10px;line-height:25px;" class="ctcontainer">  @Html.Raw(HttpUtility.HtmlDecode(Model.DisplayIntro))</div>
<div class="container">
    <p id="vnquestion-fb"> @Fcom.VNInsurance.Web.LangResource.ContactLayout.lblIfhaveQuestion</p>
   
</div>
<div class="container">
    <div class="accright">   
   
          <div id="disqus_thread"></div>
    <script type="text/javascript">
        /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
        var disqus_shortname = 'vnbaohiemcom'; // required: replace example with your forum shortname

        /* * * DON'T EDIT BELOW THIS LINE * * */
        (function () {
            var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
            dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
            (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
        })();
    </script>
  
    
        </div>

 <div class="accleft">
              
     <iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FVnbaohiem&amp;height=258&amp;colorscheme=light&amp;show_faces=true&amp;header=false&amp;stream=false&amp;show_border=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:260px;" allowTransparency="true"></iframe>   
         <div class="container">
                              <!-- AddThis Button BEGIN -->
        <div class="addthis_toolbox addthis_default_style ">
        <a class="addthis_button_preferred_1"></a>
        <a class="addthis_button_preferred_2"></a>
        <a class="addthis_button_preferred_3"></a>
        <a class="addthis_button_preferred_4"></a>
        <a class="addthis_button_compact"></a>
        <a class="addthis_counter addthis_bubble_style"></a>
        </div>
     
        <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52116863612dd7b2"></script>
        <!-- AddThis Button END -->
         </div>
    </div>
    
<div style="clear:both"></div>
    </div>
<script>
    $(document).ready(function () {

        var AppUrl = $("#AppUrl").html();
        //frmcollect

        var validator = $("#frmcollect").bind("invalid-form.validate", function () {
            //$("#summary").html("Your form contains " + validator.numberOfInvalids() + " errors, see details below.");
        }).validate({

            errorElement: "em",
            errorContainer: $("#warning, #summary"),
            errorPlacement: function (error, element) {
                element.parent().children("em").remove();
                error.appendTo(element.parent());
            },
            success: function (label) {
                label.addClass("success");
                label.removeClass("error");
            }


        });
        $("#yourfullname").rules("add", "required");
        $("#youremail").rules("add", "required");

        $("#youremail").rules("add", "email");
        $("#yourphone").rules("add", "required");
        $("#yourphone").rules("add", "number");

        //

        //
        $(".rdtrue").change(function () {
            var detaildv = $(this).attr("dl");
            $(".dl" + detaildv).removeClass("hiddenBenefit");

            return false;
        });
        $(".rdfalse").change(function () {
            var detaildv = $(this).attr("dl");
            $(".dl" + detaildv).addClass("hiddenBenefit");
            return false;
        });
        $("#Manufacturer").change(function () {
            var autoCatID = $(this).val();
            $("#Model").prop("disabled", "disabled");
            $.ajax({
                type: "post",
                url: AppUrl + "/Moto/ajLoadMotobike",
                data: { CatID: autoCatID },
                datatype: "json",
                success: function (bikes) {

                    var htmlcode = "";
                    $(bikes).each(function (index, item) {
                        htmlcode += "<option value='" + item.ID + "'>" + item.Name + "</option>";
                    });
                    $("#Model").html(htmlcode);
                    $("#Model").prop("disabled", false);
                }
            });
            return false;
        });
        //accountinfodv
        $("#optionsRadios2").change(function () {
            $(".userli").removeClass("hiddenBenefit");
            $("#yourfullname").rules("add", "required");
            $("#youremail").rules("add", "required");
            $("#youremail").rules("add", "email");
            $("#yourphone").rules("add", "required");
            //emailexist

            //youremail
            return false;
        });
        $("#optionsRadios1").change(function () { $("em[for='youremail']").removeClass("error");
            $(".userli").addClass("hiddenBenefit");
            $("#yourfullname").rules("remove", "required");
            $("#youremail").rules("remove", "required");
            $("#yourphone").rules("remove", "required");

            return false;
        });
        $("#accountbussiness").change(function () {
            $(".userpersonal").addClass("hiddenBenefit");
            $("#lbfullname").text("@Html.Raw(Fcom.VNInsurance.Web.LangResource.ContactLayout.lblcorpname)");
            $("#yourphone").attr("placeholder", "@Html.Raw(Fcom.VNInsurance.Web.LangResource.ContactLayout.lblentercorpphone)");
            $("#yourfullname").attr("placeholder", "@Html.Raw(Fcom.VNInsurance.Web.LangResource.ContactLayout.lblentercorpname)");
        });
        //accountpesional
        $("#accountpesional").change(function () {
            $(".userpersonal").removeClass("hiddenBenefit");
            $("#lbfullname").text("Họ và tên");
            $("#yourphone").attr("placeholder", "@Fcom.VNInsurance.Web.LangResource.Layout.lblEnterYourPhone");
            $("#yourfullname").attr("placeholder", "@Html.Raw(Fcom.VNInsurance.Web.LangResource.Layout.lblEnterFullname)");
        });
        //
        $("#btnsubmitf").click(function () {
            $("#youremail").blur();
            if (!$("em[for='youremail']").hasClass("error")) {
                $("#frmcollect").submit();
            }
            return false;

        });

        $("#youremail").blur(function () {

            var exists = false;
            if ($("#optionsRadios2").is(":checked")) {
                $.ajax({
                    type: "post",
                    url: "@Url.Action("CheckEmailExists", "Account")",
                    datatype: "json",
                    data: { youremail: $("#youremail").val() },
                    success: function (rvdata) {
                        if (rvdata.success) {

                            $("#youremail").addClass("error");
                            $("em[for='youremail']").html("Email is exists, please choose an other").removeClass("success").addClass("error");
                        }
                        else {
                            $("#youremail").removeClass("error");

                        }
                    }
                });
            }

            return false;
        });
    });
</script>
